<!DOCTYPE html>
<html>
    <?   
    include 'web/header.phtml';
    ?>    
    <body>

        <?
        include 'web/body.header.phtml';
        include 'web/body.menu.phtml';
        ?>

        <div id="page">

            <?
            include 'web/body.banner.phtml';
            ?>
            <?
            include 'view/listCategory.php';
            ?>

            <div id="content">
                <div class="box" id="box3">
                    <h2 class="title1">Product</h2>
                    <div class="entry">

                        <div style="clear: both; margin-bottom: 20px;"></div>
                        <p class="links">
                            <?=$PageLink ?>
                        </p>
                        <ul class="list2">
                            <?php
                            if (count($products) == 0) {
                                echo "Ko co san pham";
                            }

                            foreach ($products as $product) {
                                echo '
                                <li>
                                    <div class="product">                                       
                                        <div class="product-img">
                                            <img src=web/images/product/thumb/img08.jpg>
                                        </div>
                                        <div class="product-con">
                                             <h2>' . $product[Name] . '</h2>
                                             <p>Id: ' . $product[ProductID] . '</p>
                                             <p>Cat:   ' . $product[Category] . '</p>
                                             <p>No:    ' . $product[Quantity] . '<p>
                                             <p>Price: ' . $product[Price] . '$</p>
                                            <button onclick=addtocart(' . $product[ProductID] . ')>Buy</button>
                                        </div>                                        
                                    </div>
                                </li>  ';
                            }
                            ?>
                        </ul>
                    </div>
                </div>
            </div>

        </div>

        <?
        include 'web/body.wrapper.phtml';
        ?>
    </body>
</html>